home *** CD-ROM | disk | FTP | other *** search
- /* This code is to demonstrate the "Tiny Text optiion of AT&T PC 6300 ROM
- BIOS {int 10h}. AT&T does not support this part of the code at this time
- {ROM Rev. 1.0}. There are some bugs in the code.
- According to page 8-11 of the "AT&T System Programers Guide, calling
- the ROM video services {int 10h} with ah == 0 and, al == 48h,
- should set the monochrome moniter to 80 collums by 50 lines.
- Instead you get 80 collums by 25 lines on the top half of the screen and
- no scrolling.
- To return to 80 colums by 25 lines useing mode.com. You must use the
- co80 or bw80 pramiter instead of 80 or the screen will blank.
-
- ROM release 2.1 has the bugs fixed!
-
- ----------- Warning do not run on IBM pc. --------------
- I think the moniter could be dammaged, at the least you will have to
- reboot.
-
- writen by:
- harold barker
- P.O. Box 6051
- champaign, Illinois
- 61821-8051
-
- */
-
-
- #include "stdio.h"
-
- #define version " v2.01"
- #define lastupdate " 09-29-1985"
-
- /* vendor codes found at ffff:000e in rom */
- #define att 0x0 /* AT&T PC 6300 */
- #define compacplus 0x9a /* Compac Plus */
- #define ibmpc 0xff /* IBM PC */
- #define ibmxt 0xfe /* IBM PC XT */
- #define ibmat 0xfc /* IBM PC AT */
- #define ibmpcjr 0xfd /* IBM PCjr
-
- /* CRT mode values */
- #define tinytext 0x48 /* AT&T Tiny Text */
- #define mon80 0x2 /* monchrom 80x25 */
- #define mon40 0x0 /* monchrom 40x25 */
-
-
- int vendor; /* vendor code */
-
- main(argc,argv)
- int argc;
- char *argv[];
- {
- char *com;
- vendor = _peek(0xe,0xffff);
- if (vendor == att) /* if rom is AT&T PC 6300 */
- {
- if (argc == 2) /* if there is only on pram on command line */
- {
- /* make something intelligible out of it */
- ((argv[1][0] =='/')||(argv[1][0]=='-')||(argv[1][0]==' ')) ? com = ++argv[1] : com = argv[1];
- *com = toupper(*com); /* make sure it is uppercase */
- switch(*com)
- {
- case 'T' : mode(tinytext); break;
- case 'E' : mode(mon80); break;
- case 'F' : mode(mon40); break;
- default : help(); break;
- } /* end of switch argv[1] */
- } /* end of if argc == 2 */
- else /* if not argc == 2 */
- help(); /* give some help if needed */
- } /* end of if vendor == AT&T */
- else /* if not runnig on an AT&T PC 6300 */
- {
- help();
- puts("\nTiny Text is a function of the AT&T PC 6300 ROM, and standerd 640x400\n");
- puts("monochrome graphics. Allowing 80 columns by 50 lines of text.\n");
- puts("It would appear that your computer is unable to support this program.\n");
- } /* end of else not running on at&t pc 6300 */
- } /*end of main */
-
-
- help()
- {
- scr_rowcol(0,0); /* jump to top left corrner of screen */
- scr_clr(); /* clear screen */
- puts("\nTinyText"); puts(version); puts(lastupdate); puts(" harold barker\n");
- puts("\nUsage : A>tinytext [-/<space>]{n,f,h} \n");
- puts("Where :\n");
- puts(" e == 80x25 monochrome \n");
- puts(" f == 40x25 monochrome \n");
- puts(" h == this help screen\n");
- puts(" t == Tiny Text, AT&T PC 6300 only\n");
- puts("\nThere seems to be a bug in Mode.com.\n");
- puts("To return to 80x25 text from Tiny Text useing mode.com, use:\n");
- puts("A>mode co80<cr> or A>mode bw80\n");
- } /* end of help */
-
-
-
- mode(l) /* call BIOS to set screen mode */
- char l; /* passed option */
- {
- #asm
- mov ah,0 ;set high byte of ax reg to 0
- ;set mode opt for BIOS interrupt 10, video
- mov al,[bp+4] ; move the passed var {l} to al
- ; tiny type == 48h, 80x25 == 2h 40x25 == 0 all monochrome
- int 10h ;call BIOS
- #
- } /* end of mode */